<?php 
$message = array();
$newMsg = messages_model::_loadNewMassage();
$jml = messages_model::_loadJml();
?>

        <div class="logo">
            <a href="<?php echo base_url() ?>/main"><img src="<?php echo base_url() ?>assets/images/logo.png" width="200" alt="" /></a>
        </div>
        <div class="headerinner">
            <ul class="headmenu">
                
            <li>
                    <a class="dropdown-toggle" data-toggle="dropdown" data-target="#">
					<?php if($jml['total']!=0){?>
                    <span class="count"><?php echo $jml['total']?></span>
					<?php
					}?>
                    <span class="head-icon head-users"></span>
                    <span class="headmenu-label">New Users</span>
                    </a>
                    <ul class="dropdown-menu newusers">
                        <li class="nav-header">New Users</li>
						<?php
							foreach($newMsg as $row){
						?>
						
                        <li>
                            <a href="<?php echo base_url() ?>user/view/<?php echo $row['username'] ?>">
                                <img src="<?php echo base_url()?><?php echo $row['path_image']?>" alt="" class="userthumb" />
                                <strong><?php echo $row['username']?></strong>
                                <small><?php echo tanggal::formatDate($row['insert_date']);?></small>
                            </a>
                        </li>
						<?php
						}?>
                        
                    </ul>
                </li>
                <li class="right">
                    <div class="userloggedinfo">
                        <img src="<?php echo base_url() ?>assets/images/user.jpg" alt="" />
                        <div class="userinfo">
                            <h5> <?php echo $this->session->userdata('nama_lengkap'); ?> <small>- <?php echo $this->session->userdata('email'); ?></small></h5>
                            <ul>
                                <li><a href="<?php echo base_url() ?>login/proses_logout">Sign Out</a></li>
                                <li><a href="<?php echo base_url() ?>user/view/<?php echo $this->session->userdata('username'); ?>">Profile</a></li>
                            </ul>
                        </div>
                    </div>
                </li>
            </ul><!--headmenu-->
        </div>